package com.kevin.designpattern.intermediary;

public class Client {

    public static void main(String[] args) {

        // 创建中介者对象
        ConcreteMediator mediator = new ConcreteMediator();

        //创建租房者对象
        Tenant tenant = new Tenant("KEVIN", mediator);

        //创建房主对象
        HouseOwner houseOwner = new HouseOwner("房东", mediator);

        // 中介者设置信息
        mediator.setTenant(tenant);
        mediator.setHouseOwner(houseOwner);

        tenant.constact("我要租一个一室一厅的房间");
        houseOwner.contact("刚好，我这里有一室一厅的公寓");
    }
}
